﻿<Application x:Class="SampleApplication.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml"
             xmlns:vm="clr-namespace:Okazuki.MVVM.PrismSupport.ViewModels;assembly=Okazuki.MVVM.PrismSupport"
             Startup="Application_Startup">
    <Application.Resources>
        <Style TargetType="{x:Type TextBox}">
            <Setter Property="ToolTip" Value="{Binding Path=(Validation.Errors)[0].ErrorContent, RelativeSource={RelativeSource Mode=Self}}" />
        </Style>
        <DataTemplate DataType="{x:Type vm:ValidationErrorViewModel}">
            <TextBlock Text="{Binding ErrorMessage}" />
        </DataTemplate>
    </Application.Resources>
</Application>
